Clientarea
IP: {$user_ip}
<p id="clear-cache" style="cursor: pointer;">Clear Cache</p>
<p id="logout" style="cursor: pointer;">Logout</p>
<script>
    document.getElementById('logout').onclick = () => {
        var myRequest = new Request("/api/logout");
        fetch(myRequest)
            .then(function (response) {
                document.writeln("Logout success");
                setTimeout(() => {
                    location.href = '/'
                }, 1000)
            })
    }
    document.getElementById('clear-cache').onclick = () => {
        caches.delete("ducksite_caches").then(() => {
            alert("Clear success");
        })
    }

</script>